<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
    <TargetFrameworks Condition="'$(NetCoreAppPrevious)' != ''">$(TargetFrameworks);$(NetCoreAppPrevious)-windows;$(NetCoreAppPrevious)</TargetFrameworks>
    <IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
    <IsPackable>true</IsPackable>
    <PackageDescription>Provides a message handler for HttpClient based on the WinHTTP interface of Windows. While similar to HttpClientHandler, it provides developers more granular control over the application's HTTP communication than the HttpClientHandler.

Commonly Used Types:
System.Net.Http.WinHttpHandler</PackageDescription>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <GeneratePlatformNotSupportedAssemblyMessage Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETFramework' and '$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_WinHttpHandler</GeneratePlatformNotSupportedAssemblyMessage>
  </PropertyGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetPlatformIdentifier)' == 'windows'">
    <Compile Include="$(CommonPath)\Interop\Windows\Interop.Libraries.cs"
             Link="Common\Interop\Windows\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CERT_CONTEXT.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.CERT_CONTEXT.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CERT_INFO.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.CERT_INFO.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CERT_PUBLIC_KEY_INFO.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.CERT_PUBLIC_KEY_INFO.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CRYPT_ALGORITHM_IDENTIFIER.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.Interop.CRYPT_ALGORITHM_IDENTIFIER.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CRYPT_BIT_BLOB.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.Interop.CRYPT_BIT_BLOB.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.DATA_BLOB.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.DATA_BLOB.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.MsgEncodingType.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.Interop.MsgEncodingType.cs" />
    <Compile Include="$(CommonPath)\Interop\Windows\Crypt32\Interop.CertEnumCertificatesInStore.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.CertEnumCertificatesInStore.cs" />
    <Compile Include="$(CommonPath)\Interop\Windows\Crypt32\Interop.certificates_types.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.certificates_types.cs" />
    <Compile Include="$(CommonPath)\Interop\Windows\Crypt32\Interop.certificates.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.certificates.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.FormatMessage.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.FormatMessage.cs" />
    <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.GetModuleHandle.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.GetModuleHandle.cs" />
    <Compile Include="$(CommonPath)\Interop\Windows\Interop.HRESULT_FROM_WIN32.cs"
             Link="Common\Interop\Windows\Interop.HRESULT_FROM_WIN32.cs" />
    <Compile Include="$(CommonPath)\Interop\Windows\SChannel\UnmanagedCertificateContext.IntPtr.cs"
             Link="Common\Interop\Windows\SChannel\UnmanagedCertificateContext.IntPtr.cs" />
    <Compile Include="$(CommonPath)\Interop\Windows\WinHttp\Interop.SafeWinHttpHandle.cs"
             Link="Common\Interop\Windows\WinHttp\Interop.SafeWinHttpHandle.cs" />
    <Compile Include="$(CommonPath)\Interop\Windows\WinHttp\Interop.winhttp_types.cs"
             Link="Common\Interop\Windows\WinHttp\Interop.winhttp_types.cs" />
    <Compile Include="$(CommonPath)\Interop\Windows\WinHttp\Interop.winhttp.cs"
             Link="Common\Interop\Windows\WinHttp\Interop.winhttp.cs" />
    <Compile Include="$(CommonPath)\System\CharArrayHelpers.cs"
             Link="Common\System\CharArrayHelpers.cs" />
    <Compile Include="$(CommonPath)\System\Net\HttpKnownHeaderNames.cs"
             Link="Common\System\Net\HttpKnownHeaderNames.cs" />
    <Compile Include="$(CommonPath)\System\Net\HttpKnownHeaderNames.TryGetHeaderName.cs"
             Link="Common\System\Net\HttpKnownHeaderNames.TryGetHeaderName.cs" />
    <Compile Include="$(CommonPath)System\Net\HttpStatusDescription.cs"
             Link="Common\System\Net\Http\HttpStatusDescription.cs" />
    <Compile Include="$(CommonPath)\System\Net\SecurityProtocol.cs"
             Link="Common\System\Net\SecurityProtocol.cs" />
    <Compile Include="$(CommonPath)\System\Net\UriScheme.cs"
             Link="Common\System\Net\UriScheme.cs" />
    <Compile Include="$(CommonPath)\System\Net\Http\HttpHandlerDefaults.cs"
             Link="Common\System\Net\Http\HttpHandlerDefaults.cs" />
    <Compile Include="$(CommonPath)\System\Net\Http\WinInetProxyHelper.cs"
             Link="Common\System\Net\Http\WinInetProxyHelper.cs" />
    <Compile Include="$(CommonPath)\System\Net\Security\CertificateHelper.cs"
             Link="Common\System\Net\Security\CertificateHelper.cs" />
    <Compile Include="$(CommonPath)\System\Net\Security\CertificateHelper.Windows.cs"
             Link="Common\System\Net\Security\CertificateHelper.Windows.cs" />
    <Compile Include="$(CommonPath)\System\Runtime\ExceptionServices\ExceptionStackTrace.cs"
             Link="Common\System\Runtime\ExceptionServices\ExceptionStackTrace.cs" />
    <Compile Include="$(CommonPath)\System\Threading\Tasks\RendezvousAwaitable.cs"
             Link="Common\System\Threading\Tasks\RendezvousAwaitable.cs" />
    <Compile Include="System\Net\Http\NetEventSource.WinHttpHandler.cs" />
    <Compile Include="System\Net\Http\NoWriteNoSeekStreamContent.cs" />
    <Compile Include="System\Net\Http\WinHttpAuthHelper.cs" />
    <Compile Include="System\Net\Http\WinHttpCertificateHelper.cs" />
    <Compile Include="System\Net\Http\WinHttpChannelBinding.cs" />
    <Compile Include="System\Net\Http\WinHttpChunkMode.cs" />
    <Compile Include="System\Net\Http\WinHttpCookieContainerAdapter.cs" />
    <Compile Include="System\Net\Http\WinHttpException.cs" />
    <Compile Include="System\Net\Http\WinHttpHandler.cs" />
    <Compile Include="System\Net\Http\WinHttpRequestCallback.cs" />
    <Compile Include="System\Net\Http\WinHttpRequestState.cs" />
    <Compile Include="System\Net\Http\WinHttpRequestStream.cs" />
    <Compile Include="System\Net\Http\WinHttpResponseHeaderReader.cs" />
    <Compile Include="System\Net\Http\WinHttpResponseParser.cs" />
    <Compile Include="System\Net\Http\WinHttpResponseStream.cs" />
    <Compile Include="System\Net\Http\WinHttpTraceHelper.cs" />
    <Compile Include="System\Net\Http\WinHttpTrailersHelper.cs" />
    <Compile Include="System\Net\Http\WinHttpTransportContext.cs" />
    <Compile Include="$(CommonPath)System\IO\StreamHelpers.CopyValidation.cs"
             Link="Common\System\IO\StreamHelpers.CopyValidation.cs" />
    <Compile Include="$(CommonPath)System\Net\Logging\NetEventSource.Common.cs"
             Link="Common\System\Net\Logging\NetEventSource.Common.cs" />
    <Compile Include="$(CommonPath)System\Obsoletions.cs"
             Link="Common\System\Obsoletions.cs" />
    <Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
             Link="Common\DisableRuntimeMarshalling.cs"
             Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
    <Compile Include="$(CommonPath)System\Threading\Tasks\TaskToAsyncResult.cs" Link="Common\System\Threading\Tasks\TaskToAsyncResult.cs" />
    <Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\UnconditionalSuppressMessageAttribute.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
    <PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
    <PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
    <Reference Include="System.Net.Http" />
  </ItemGroup>

</Project>
